1. Field of the Invention
The field of the invention relates to digital devices. More particularly, the field of the invention relates to optimizing high-level source code for digital devices comprising programmable processors.
2. Description of the Related Technology
As is known in the art, a software application can be described by a high-level programming language or code, e.g., Pascal, Fortran, C++. Although there has been some research in the field of high-level programming language optimization, there has been little work done in the field of optimizing code that is targeted for programmable processors. For example, the article, Miranda M., Catthoor F., Janssen M. and De Man H., “High-level address optimization and synthesis techniques for data-transfer intensive applications”, IEEE Transactions on VLSI systems, Vol. 6, No. 4, pp. 677-686, December 1998, describes a system for optimizing source code that is targeted for custom processors design or synthesis. However, this article fails to describe how address optimization can be applied in a context wherein resources are fixed or are predetermined.
Furthermore, the article, Liem C., Paulin P., Jerraya A., “Address calculation of retargetable compilation and exploration of instruction-set architectures”, Proceedings 33rd Design Automation Conference, describes an approach for rewriting code for instruction-set architectures which uses detailed knowledge of a particular target architecture. Disadvantageously, this approach optimizes instruction-level code which is machine specific.
For example, in Liem, address expression optimization is performed on pointer types, which masks the actual address expression. Since instruction level code is typically longer than source code, pointer type optimization is typically limited to smaller blocks of the code. In instruction level optimization, a block of code typically relates to a branch of the code that is induced by a conditional statement. In Lien, since only parts of the code are examined in the optimization and due to the masking of the address expression, global optimization opportunities are overlooked. Furthermore, this approach does not describe how to provide optimization methods for partly programmable processors wherein the optimization method is processor-independent.
Thus, there is a need for examining address expression optimization for source code as opposed to instruction code. There is also a need for a system and method of optimizing high-level source code wherein the optimization is machine-independent.